<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="generator" content="VuePress 2.0.0-beta.62">
    <style>
      :root {
        --c-bg: #fff;
      }
      html.dark {
        --c-bg: #22272e;
      }
      html, body {
        background-color: var(--c-bg);
      }
    </style>
    <script>
      const userMode = localStorage.getItem('vuepress-color-scheme');
			const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
			if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
				document.documentElement.classList.toggle('dark', true);
			}
    </script>
    <link rel="icon" href="/favicon.jpg"><title>多数据源 | 您好， 欢迎查看 HZY 文档 ！</title><meta name="description" content="HZY 开源项目文档网站！">
    <link rel="preload" href="/docs/assets/style-961b9d5d.css" as="style"><link rel="stylesheet" href="/docs/assets/style-961b9d5d.css">
    <link rel="modulepreload" href="/docs/assets/app-4f4af2d5.js"><link rel="modulepreload" href="/docs/assets/dbs.html-9052a8ef.js"><link rel="modulepreload" href="/docs/assets/dbs.html-4250b788.js"><link rel="prefetch" href="/docs/assets/index.html-28072875.js" as="script"><link rel="prefetch" href="/docs/assets/code-gen.html-4397c299.js" as="script"><link rel="prefetch" href="/docs/assets/home.html-3fb3b3b2.js" as="script"><link rel="prefetch" href="/docs/assets/ioc-aop.html-0144cd72.js" as="script"><link rel="prefetch" href="/docs/assets/scheduled-tasks.html-bedcb769.js" as="script"><link rel="prefetch" href="/docs/assets/user-info.html-8578df40.js" as="script"><link rel="prefetch" href="/docs/assets/home.html-013ddfd3.js" as="script"><link rel="prefetch" href="/docs/assets/efcore.html-ec28f7d0.js" as="script"><link rel="prefetch" href="/docs/assets/sql.html-fe3eac11.js" as="script"><link rel="prefetch" href="/docs/assets/work.html-fe7c2daa.js" as="script"><link rel="prefetch" href="/docs/assets/simple.html-54212753.js" as="script"><link rel="prefetch" href="/docs/assets/split.html-e759ef21.js" as="script"><link rel="prefetch" href="/docs/assets/client.html-f2da1493.js" as="script"><link rel="prefetch" href="/docs/assets/download.html-903adac5.js" as="script"><link rel="prefetch" href="/docs/assets/problem.html-1c845052.js" as="script"><link rel="prefetch" href="/docs/assets/api.html-caba109f.js" as="script"><link rel="prefetch" href="/docs/assets/authorize.html-37a2ba6f.js" as="script"><link rel="prefetch" href="/docs/assets/data.html-578c517a.js" as="script"><link rel="prefetch" href="/docs/assets/api-check-model.html-b5cf845e.js" as="script"><link rel="prefetch" href="/docs/assets/api-resource-cache.html-f627996b.js" as="script"><link rel="prefetch" href="/docs/assets/api-result.html-f90b60b9.js" as="script"><link rel="prefetch" href="/docs/assets/request-limit.html-79d7eb18.js" as="script"><link rel="prefetch" href="/docs/assets/404.html-f9875e7b.js" as="script"><link rel="prefetch" href="/docs/assets/index.html-f24f1c0d.js" as="script"><link rel="prefetch" href="/docs/assets/code-gen.html-9aef4a31.js" as="script"><link rel="prefetch" href="/docs/assets/home.html-287156bf.js" as="script"><link rel="prefetch" href="/docs/assets/ioc-aop.html-c387c913.js" as="script"><link rel="prefetch" href="/docs/assets/scheduled-tasks.html-b338f70f.js" as="script"><link rel="prefetch" href="/docs/assets/user-info.html-8f482e6a.js" as="script"><link rel="prefetch" href="/docs/assets/home.html-7cba3ecd.js" as="script"><link rel="prefetch" href="/docs/assets/efcore.html-c2834bdb.js" as="script"><link rel="prefetch" href="/docs/assets/sql.html-e0d45a22.js" as="script"><link rel="prefetch" href="/docs/assets/work.html-6d0ca231.js" as="script"><link rel="prefetch" href="/docs/assets/simple.html-80586b86.js" as="script"><link rel="prefetch" href="/docs/assets/split.html-7a328015.js" as="script"><link rel="prefetch" href="/docs/assets/client.html-0c7bcd45.js" as="script"><link rel="prefetch" href="/docs/assets/download.html-27f039c3.js" as="script"><link rel="prefetch" href="/docs/assets/problem.html-9ef68938.js" as="script"><link rel="prefetch" href="/docs/assets/api.html-8c3a828a.js" as="script"><link rel="prefetch" href="/docs/assets/authorize.html-be0e89f8.js" as="script"><link rel="prefetch" href="/docs/assets/data.html-0f889ade.js" as="script"><link rel="prefetch" href="/docs/assets/api-check-model.html-8aaab178.js" as="script"><link rel="prefetch" href="/docs/assets/api-resource-cache.html-465cb7e9.js" as="script"><link rel="prefetch" href="/docs/assets/api-result.html-f2682747.js" as="script"><link rel="prefetch" href="/docs/assets/request-limit.html-c85ce0aa.js" as="script"><link rel="prefetch" href="/docs/assets/404.html-ee2a0c1c.js" as="script">
  </head>
  <body>
    <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/docs/" class=""><!----><span class="site-name">您好， 欢迎查看 HZY 文档 ！</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a class="external-link" href="https://www.bilibili.com/video/BV1tt4y157qH/" rel="noopener noreferrer" target="_blank" aria-label="视频讲解"><!--[--><!--]--> 视频讲解 <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="navbar-item"><a href="/docs/guide/others/home.md" class="" aria-label="其他项目"><!--[--><!--]--> 其他项目 <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="http://124.221.128.7:5600/" rel="noopener noreferrer" target="_blank" aria-label="HzyAdmin 预览"><!--[--><!--]--> HzyAdmin 预览 <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://gitee.com/hzy6" rel="noopener noreferrer" target="_blank" aria-label="gitee"><!--[--><!--]--> gitee <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/hzy-6" rel="noopener noreferrer" target="_blank" aria-label="github"><!--[--><!--]--> github <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-color-mode-button" title="toggle color mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><div class="navbar-item"><a class="external-link" href="https://www.bilibili.com/video/BV1tt4y157qH/" rel="noopener noreferrer" target="_blank" aria-label="视频讲解"><!--[--><!--]--> 视频讲解 <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="navbar-item"><a href="/docs/guide/others/home.md" class="" aria-label="其他项目"><!--[--><!--]--> 其他项目 <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="http://124.221.128.7:5600/" rel="noopener noreferrer" target="_blank" aria-label="HzyAdmin 预览"><!--[--><!--]--> HzyAdmin 预览 <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://gitee.com/hzy6" rel="noopener noreferrer" target="_blank" aria-label="gitee"><!--[--><!--]--> gitee <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/hzy-6" rel="noopener noreferrer" target="_blank" aria-label="github"><!--[--><!--]--> github <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><a href="/docs/guide/hzy-admin/home.md" class="sidebar-item sidebar-heading active collapsible" aria-label="HzyAdmin"><!--[--><!--]--> HzyAdmin <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a href="/docs/guide/hzy-admin/home.md" class="sidebar-item" aria-label="欢迎使用"><!--[--><!--]--> 欢迎使用 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/user-info.md" class="sidebar-item" aria-label="获取登陆人信息"><!--[--><!--]--> 获取登陆人信息 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/scheduled-tasks.md" class="sidebar-item" aria-label="定时任务"><!--[--><!--]--> 定时任务 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/code-gen.md" class="sidebar-item" aria-label="代码生成"><!--[--><!--]--> 代码生成 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/ioc-aop.md" class="sidebar-item" aria-label="自动 IOC 注入 和 AOP"><!--[--><!--]--> 自动 IOC 注入 和 AOP <!--[--><!--]--></a><!----></li><li><p tabindex="0" class="sidebar-item active collapsible">数据库 <span class="down arrow"></span></p><ul style="" class="sidebar-item-children"><!--[--><li><a href="/docs/guide/hzy-admin/database/efcore.md" class="sidebar-item" aria-label="EFCore 初始化数据库"><!--[--><!--]--> EFCore 初始化数据库 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/database/sql.md" class="sidebar-item" aria-label="SQL 初始化数据库"><!--[--><!--]--> SQL 初始化数据库 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/database/dbs.md" class="sidebar-item active" aria-label="多数据源"><!--[--><!--]--> 多数据源 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/database/work.md" class="sidebar-item" aria-label="事务，延迟提交"><!--[--><!--]--> 事务，延迟提交 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item collapsible">部署 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/docs/guide/hzy-admin/deployment/split.md" class="sidebar-item" aria-label="前后端分离部署"><!--[--><!--]--> 前后端分离部署 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/deployment/simple.md" class="sidebar-item" aria-label="整体部署"><!--[--><!--]--> 整体部署 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item collapsible">权限 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/docs/guide/hzy-admin/permission/authorize.md" class="sidebar-item" aria-label="授权验证"><!--[--><!--]--> 授权验证 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/permission/data.md" class="sidebar-item" aria-label="数据权限"><!--[--><!--]--> 数据权限 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/permission/api.md" class="sidebar-item" aria-label="接口权限"><!--[--><!--]--> 接口权限 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item collapsible">WebApi <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/docs/guide/hzy-admin/web-api/api-check-model.md" class="sidebar-item" aria-label="模型验证"><!--[--><!--]--> 模型验证 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/web-api/api-result.md" class="sidebar-item" aria-label="统一返回"><!--[--><!--]--> 统一返回 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/web-api/api-resource-cache.md" class="sidebar-item" aria-label="缓存特性"><!--[--><!--]--> 缓存特性 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/web-api/request-limit.md" class="sidebar-item" aria-label="限流特性"><!--[--><!--]--> 限流特性 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item collapsible">其他 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/docs/guide/hzy-admin/others/client.md" class="sidebar-item" aria-label="前端运行及说明"><!--[--><!--]--> 前端运行及说明 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/others/download.md" class="sidebar-item" aria-label="前端下载文件"><!--[--><!--]--> 前端下载文件 <!--[--><!--]--></a><!----></li><li><a href="/docs/guide/hzy-admin/others/problem.md" class="sidebar-item" aria-label="更多问题"><!--[--><!--]--> 更多问题 <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">其他项目 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/docs/guide/others/home.md" class="sidebar-item" aria-label="介绍"><!--[--><!--]--> 介绍 <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><!--]--><div><h1 id="多数据源" tabindex="-1"><a class="header-anchor" href="#多数据源" aria-hidden="true">#</a> 多数据源</h1><div class="custom-container tip"><p class="custom-container-title">多数据源说明</p><p>多数据源必须创建一套类似 HZY.Repository.EntityFramework.Admin 的类库，命名规则为 HZY.Repository.EntityFramework.数据库名称。 在使用时注入 IRepository&lt;你的实体名称&gt; 仓储对象作为数据库操作对象。</p></div><h2 id="_1、定义仓储类库" tabindex="-1"><a class="header-anchor" href="#_1、定义仓储类库" aria-hidden="true">#</a> 1、定义仓储类库</h2><p><img src="/docs/hzy-admin/database/dbs-1.jpg" alt="多数据源"></p><h2 id="_2、配置数据库连接字符串" tabindex="-1"><a class="header-anchor" href="#_2、配置数据库连接字符串" aria-hidden="true">#</a> 2、配置数据库连接字符串</h2><p><img src="/docs/hzy-admin/database/dbs-2.jpg" alt="数据库连接字符串"></p><h2 id="_3、切换数据库类型" tabindex="-1"><a class="header-anchor" href="#_3、切换数据库类型" aria-hidden="true">#</a> 3、切换数据库类型</h2><div class="custom-container warning"><p class="custom-container-title">见步骤2图中</p><p>修改 appsettings.Development.json ，appsettings.Production.json 文件中的 AdminRepositoryOptions.DefaultDatabaseType 数据库类型即可。</p></div><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token comment">// 连接字符串</span>
  <span class="token property">&quot;ConnectionStrings&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token comment">// sqlserver</span>
    <span class="token property">&quot;SqlServer&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Server=.;Database=hzy_admin_sqlserver_20230227;User ID=sa;Password=123456;MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">// mysql</span>
    <span class="token property">&quot;MySql&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Server=localhost; port=3306; Database=hzy_admin_mysql_20230227; uid=root; pwd=123456; Convert Zero Datetime=False&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">// postgresql</span>
    <span class="token property">&quot;PostgreSql&quot;</span><span class="token operator">:</span> <span class="token string">&quot;User ID=postgres;Password=123456;Host=localhost;Port=5432;Database=hzy_admin_pgsql_20230227;Pooling=true;TimeZone=Asia/Shanghai&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">// oracle</span>
    <span class="token property">&quot;Oracle&quot;</span><span class="token operator">:</span> <span class="token string">&quot;user id=hzy_admin_oracle_20221213;password=123456; data source=//127.0.0.1:1521/orcl;Pooling=true;Min Pool Size=1&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">// redis</span>
    <span class="token property">&quot;Redis&quot;</span><span class="token operator">:</span> <span class="token string">&quot;127.0.0.1:6379,password=123456,defaultDatabase=0&quot;</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token comment">// admin 数据库管理</span>
  <span class="token property">&quot;AdminRepositoryOptions&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token comment">//默认数据库类型 SqlServer 、MySql 、PostgreSql、Oracle</span>
    <span class="token property">&quot;DefaultDatabaseType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SqlServer&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">//是否监控EFCore程序</span>
    <span class="token property">&quot;IsMonitorEFCore&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></div><!--[--><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><div class="meta-item contributors"><span class="meta-item-label">Contributors: </span><span class="meta-item-info"><!--[--><!--[--><span class="contributor" title="email: 1396510655@qq.com">hzy</span><!----><!--]--><!--]--></span></div></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
    <script type="module" src="/docs/assets/app-4f4af2d5.js" defer></script>
  </body>
</html>
